package filters;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class TxtFilter extends FileFilter {

    @Override
    public boolean accept(File f) {
        if (f.isDirectory()) {
            return true;
        }
        String str = TIOAFilter.getExtension(f);
        if (str != null) {
            if (str.equals("txt")) {
                return true;
            } else {
                return false;
            }
        }
        return false;
    }

    @Override
    public String getDescription() {
        return "*.txt";
    }
}
